﻿using System;
using System.Collections.Generic;
using System.Text;
using Lidgren.Network;

namespace ObjectSync.Interfaces
{
	public enum comStatus{
		diconected,
		connected
	}

    public interface ICommunicator
    {
        /// <summary>
        /// Initiate the communication process
        /// </summary>
        void Initiate();
        /// <summary>
        /// Write a Message
        /// </summary>
        /// <param name="message"></param>
        void Write(string message);

        void Write(byte[] message);

		void Send(NetBuffer sendBuffer);

        void Send(NetOutgoingMessage sendBuffer);

		NetOutgoingMessage GetOutMenssage();

		comStatus getStatus();

		void Send(NetOutgoingMessage sendBuffer, NetDeliveryMethod deliverMethod);
		//void Send(NetBuffer sendBuffer, NetChannel channel);

        /// <summary>
        /// Read a message
        /// </summary>
        /// <returns></returns>
        Message[] Read();

    }
}
